package com.flyco.modules.stm.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.flyco.common.aspect.annotation.Dict;
import com.flyco.poi.excel.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;

/**
 * @Description: 门店库存
 * @Author: flyco
 * @Date:   2020-10-20
 * @Version: V1.0
 */
@Data
@TableName("stm_stock")
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="stm_stock对象", description="门店库存")
public class StmStock {
    
	/**id*/
	@TableId(type = IdType.AUTO)
    @ApiModelProperty(value = "id")
	private Long id;
	private Long partnerId;
	/**店铺id*/
	@Excel(name = "店铺", width = 20, dictTable ="stm_store_info",dicText = "name",dicCode = "store_id" )
    @ApiModelProperty(value = "店铺id")
	@Dict(dictTable ="stm_store_info",dicText = "name",dicCode = "store_id")
	private Long storeId;
	/**商品id*/
	@Excel(name = "商品", width = 40, dictTable ="pms_product",dicText = "name",dicCode = "id")
    @ApiModelProperty(value = "商品id")
	@Dict(dictTable ="pms_product",dicText = "name",dicCode = "id")
	private Long productId;
	/**货号*/
	@Excel(name = "货号", width = 15)
	@ApiModelProperty(value = "货号")
	private String productSn;
	/**sku编码*/
	@Excel(name = "SKU编码", width = 20)
    @ApiModelProperty(value = "sku编码")
	private String skuCode;
	/**库存*/
	@Excel(name = "库存", width = 15)
    @ApiModelProperty(value = "库存")
	private Integer stock;
	/**锁定库存*/
	@Excel(name = "锁定库存", width = 15)
	@ApiModelProperty(value = "锁定库存")
	private Integer lockStock;
	/**预警数量*/
    @ApiModelProperty(value = "预警数量")
	private Integer lowNum;
	/**赠品库存*/
	@Excel(name = "赠品库存", width = 15)
	@ApiModelProperty(value = "赠品库存")
	private Integer giftStock;
	/**锁定赠品库存*/
	@Excel(name = "锁定赠品库存", width = 15)
	@ApiModelProperty(value = "锁定赠品库存")
	private Integer lockGiftStock;
	/**样品库存*/
	@Excel(name = "样品库存", width = 15)
    @ApiModelProperty(value = "样品库存")
	private Integer sampleStock;
	/**残损库存*/
	@Excel(name = "残损库存", width = 15)
    @ApiModelProperty(value = "残损库存")
	private Integer lossStock;
	/**差异库存*/
	@Excel(name = "差异库存", width = 15)
    @ApiModelProperty(value = "差异库存")
	private Integer diffStock;
	/**备用库存*/
	@Excel(name = "备用库存", width = 15)
    @ApiModelProperty(value = "备用库存")
	private Integer innerStock;
	/**每日加权销售量(权重：30天0.6 7天0.3 1天0.1)*/
	@ApiModelProperty(value = "每日加权销售量")
	private BigDecimal salesQtyPreDay;
	/**创建人*/
    @ApiModelProperty(value = "创建人")
	private String createBy;
	/**创建时间*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建时间")
	private Date createTime;
	/**更新人*/
    @ApiModelProperty(value = "更新人")
	private String updateBy;
	/**更新时间*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新时间")
	private Date updateTime;
}
